Public Class ShowPageSettings

    Private Sub btnPage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPage.Click

        Dim PageDB As New PageSetupDialog()
        PageDB.Document = New System.Drawing.Printing.PrintDocument()

        If (PageDB.ShowDialog() = DialogResult.OK) Then
            TextBox1.Text = ""

            TextBox1.AppendText("Allow Margins: " & PageDB.AllowMargins)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Allow Orientation: " & PageDB.AllowOrientation)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Allow Paper: " & PageDB.AllowPaper)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Allow Printer: " & PageDB.AllowPrinter)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Minimum Margins: " & PageDB.MinMargins.ToString())
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Network: " & PageDB.ShowNetwork)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Printer Settings: " & PageDB.PrinterSettings.ToString())
        End If

    End Sub
End Class
